package cn.yinzhiping.redislearn.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 消费者
 * @author yinzhiping
 */
@Component
public class Receiver {
    private static Logger logger = LoggerFactory.getLogger(Receiver.class);

    public void receiveMessage(String message) throws InterruptedException {
        //for (int i = 0; i < 5; i++) {
            Thread.sleep(5000);
            logger.info("收到的mq消息" + message+"--i");
        //}

    }
}
